1. Field of the Invention
The present invention relates to an image-signal processing apparatus, an image-signal processing method, and a program and, more specifically, relates to an image-signal processing apparatus, an image-signal processing method, and a program suitably used for tracking an object moving in an image.
2. Description of the Related Art
For example, when carrying out image processing, such as detecting and tracking a suspicious individual in an image captured by a security camera and then performing noise cancelling, analyzing a trajectory of a certain soccer player in an image of a soccer game, or tracking and trimming your own child in an image of a sports festival, a process of tracking an object (such as, the suspicious individual, the soccer play, or the child) in time-sequential images constituting a moving image is carried out.
To track an object moving in an image according to the related art, there are methods such as setting a moving image as a tracking target and tracking a tracking point set on the tracking target and estimating an area in which the tracking target is included and carrying out tracking in units of such area. In either method, motion vectors of points and areas in the image are detected.
A typical method for detecting a motion vector in an image is a block matching method. In the block matching method, an image block (hereinafter referred to as “matching area”) having a predetermined size (horizontal pixels×vertical pixels) is provided in one of two images consecutive in time, and a search area larger than the matching area is provided in the other image. Then, the total absolute difference of the pixel values in the matching area and the search area is calculated as an evaluated value. A position where the evaluated value is minimized is determined to be the destination of the matching area, and a motion vector of the block area is detected.
When black bars exist in an image, there are the following inconveniences in using the block matching method.
For example, as shown in FIG. 1, when a matching area is provided near a black bar, the calculated evaluated value does not change very much even when moved in the horizontal direction, as shown in FIG. 2, and thus it is difficult to determine the position where the evaluated value is minimized. Therefore, there is high possibility of not being able to detect an accurate motion vector. If an accurate motion vector is not detected, the detected motion vectors will be discontinuous over time.
Therefore, so long as the tracking of moving object is based on an inaccurate motion vector not having continuity over time, it is difficult to accurately track the moving object.
Accordingly, black bars in the image can be detected, and then detection of a motion vector by block matching can be avoided near the detected black bars.
As a method of detecting black bars in an image, there is a method in which a border position between a black bar and an actual image is detected in each frame of an image signal on the basis of, for example, a low-luminance level or a difference between adjacent pixels and the continuity over time of the detected border position is identified (for example, refer to Japanese Unexamined Patent Application Publication No. 9-270966) and in which a black bar is detected on the presumption that the black bar exist within a certain line period from the screen edge (for example, refer to Japanese Unexamined Patent Application Publication No. 7-298200).